
dms.editor = 
{
	editorLoaded: false
};
dms.editor.init = function(data)
{
	this.setTitle(data.filename);
	var id = Ext.id();
	data.textareaId = id;
	this.add(new Ext.Panel(
	{
		border: false,
		layout: 'fit',
		html: '<iframe id="'+id+'" src="app/editor/editarea.html?file='+data.path+data.filename+'" scrolling="no" style="width:100%;height:100%;border:0;"></iframe>',
		tbar: [
		{
			text: '保存'
		}]
	}));
	this.doLayout();
}


dms.editor.getIframeDoc = function(iframe)
{
	return iframe.contentDocument || iframe.contentWindow.document;
}